package org.awa.demo.opencv.gis.bean;

import lombok.Data;
import org.locationtech.jts.geom.Geometry;
import org.locationtech.jts.geom.Point;

import java.util.HashMap;
import java.util.Map;

/**
 * 水平几何 栅格
 *
 * @author xxf
 */
@Data
public class HorizontalElement {

    private Geometry geom;

    //栅格内周长长度
    private double intersectionLength;

    private double height;

    private Map<RoadOrder,Double> roadDistanceHorizontal = new HashMap<>();

    private double lept;

    private double x;
    private double y;

    public HorizontalElement(HorizontalElement element){
        this.geom = element.geom;
        this.intersectionLength = element.getIntersectionLength();
        this.roadDistanceHorizontal = new HashMap<>(element.getRoadDistanceHorizontal());
        Point centerPoint = this.geom.getInteriorPoint();
        this.x = centerPoint.getX();
        this.y = centerPoint.getY();
    }

    public HorizontalElement(){}


}
